﻿using System;
using Ninject;
using Samples.DependencyInjectedConsole.Accounts;
using Samples.DependencyInjectedConsole.Ninject;

namespace Samples.DependencyInjectedConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            var usdKernel = new StandardKernel(new USDAccountModule());
            var usdAccount = usdKernel.Get<Account>();

            usdAccount.Set(300.67);
            Console.WriteLine(usdAccount.Amount);

            usdAccount.Add(45993);
            Console.WriteLine(usdAccount.Amount);

            var euroKernel = new StandardKernel(new EuroAccountModule());
            var euroAccount = euroKernel.Get<Account>();

            euroAccount.Set(38.05);
            Console.WriteLine(euroAccount.Amount);

            euroAccount.Subtract(3.25);
            Console.WriteLine(euroAccount.Amount);

            euroAccount.Add(5031.09);
            Console.WriteLine(euroAccount.Amount);

            Console.ReadLine();
        }
    }
}
